#!/usr/bin/env ruby
require "git-semver-cop"

# Make sure we're not inside of .git
Dir.chdir("..") if ENV["GIT_DIR"] == "."

# Reopen STDIN for user response
$stdin.reopen(File.open("/dev/tty", "r"))

# Enforce our semver
GitSemverCop::Semver.new.enforce

# Update version files (gemspec, package.json)
GitSemverCop.update_version_files
